package com.cloudkinto.service.orderrepair;

import com.cloudkinto.entity.OrderRepairDo;
import com.baomidou.mybatisplus.extension.service.IService;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.dic.vo.dicBusinessItem.DicBusinessNewEntity;
import com.cloudkinto.service.finance.vo.RepairBillExportVo;
import com.cloudkinto.service.orderrepair.vo.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * service接口
 * </p>
 *
 * @author hua
 * @since 2023-06-14
 */
public interface OrderRepairService extends IService<OrderRepairDo> {

    SingleResult addInit();

    void add(OrderRepairAddReq req, Long userId);

    List<Map> repairCategoryInit(Long companyId);

    void addOrUpdateCategory(DicBusinessNewEntity idAndNameEntity);

    SingleResult updateInit(Long id);

    Object update(OrderRepairUpdateReq updateVo, Long userId);

    void deleteSku(DeleteSkuOrComponentReq req, Long userId);

    int delete(Long id, Long userId);

    OrderRepairDetailRes detail(Long id);

    SingleResult pageInit();

    List<OrderRepairPageRes> getList(Map<String, String> map);

    PageResult getListPage(Map<String, String> map);

    //查询分页列表之后对列表数据的处理
    List<RepairBillExportVo> handlerBillListAfter(List<String> ids);

    void markConfirm(Long id, Long userId);

    void discard(Long id, Long userId);

    FinishRepairInitRes beginRepairInit(Long id);

    void beginRepair(BeginRepairReq req, Long userId);

    FinishRepairInitRes finishRepairInit(Long id, Integer type);

    void finishRepair(FinishRepairReq req, Long userId);

    void cannotRepair(CannotRepairReq req, Long userId);

    void finishIndicate(FinishIndicateReq req, Long userId);

    ChargeInitRes chargeInit(Long id);

    void charge(ChargeReq req, Long userId);

    List<OrderRepairDetailRes> batchExportInit(String[] ids);

    void batchExportRepair(BatchExportRepairReq req, Long userId, HttpServletResponse response) throws IOException;

    void exportRepair(ExportRepairReq req, Long userId, HttpServletResponse response) throws IOException;

    void printSn(String[] id, Long userId, HttpServletResponse response);

    void printSnSku(String id, String repairSkuId, Long userId, HttpServletResponse response);


}
